// pages/shop/detail.js
let app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    good: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    app.request('/api/shop/good', {
      id: options.id
    }, function(data){
      console.log(data)
      that.setData({good:data})
    });
  }
})